<template>
  <div>
    <h3>这是子组件</h3>
    <p>count: {{ props.count }}</p>
    <p>{{ name }}</p>
  </div>
</template>

<script setup lang="ts">
import { inject } from "vue";

// const props = defineProps({
//   count: Number,
// });

interface PropType {
  count?: number;
}
const props = defineProps<PropType>();

const name = inject<string>("name");
</script>
